<template>
  <div>
    <input @input="setValue" :value="name" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: "",
    };
  },
  inject: {
    setName: {},
  },
  methods: {
    setValue(e) {
      this.name = e.target.value;

      this.setName(this.name);
    },
  },
};
</script>
